<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="utf-8">
<meta name="viewport"
	content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
<meta name="format-detection"
	content="telephone=no,email=no,date=no,address=no">
<link rel="stylesheet" type="text/css" href="../css/aui.css" />
<style type="text/css">
.text-white {
	color: #ffffff !important;
}

.aui-grid [class=aui-col-] {
	padding: 0.75 rem 0;
}

.aui-list-item-arrow .my-font {
	font-size: 14px;
}
</style>
</head>
<script src="../js/jquery.min.js"></script>
<script src="../js/aui-dialog.js"></script>

<script type="text/javascript">
	
		//初始方法
	$(function() {
		getInfo();
	});
	
	
	function getInfo() {
		//$("#loading").show();
		$.ajax({
				url : '${pageContext.request.contextPath}/appcrm/getLoginCustomer.do',
				type : "POST",
				dataType : "json",
				success : function(data) {
					var ret = data;
					//$("#loading").hide();
					if (ret.code == 0) {
						if (ret.customer != "" && ret.customer != null && typeof(ret.customer)!="undefined") {
							$("#phone").html(ret.customer.mobileNumber);
							$("#name").html(ret.customer.customerName);
							//alert(ret.customer.portrait);
							if (ret.customer.portrait != null && ret.customer.portrait != "") {
								$("#picture").attr("src", ret.customer.portrait);
							}
						}
					} else {
						/* dialog.alert({
							msg : '暂无数据',
							buttons : ['取消', '确定']
						}, function(ret) {
							console.log(ret)
						}) */
					}
				}
			});
	}
	
	
	//我的顾问
	function openCard() {
		window.location.href = "${pageContext.request.contextPath}/wap/public_users.do?path=users_detailed&id=${sessionScope.loginCustomer.personLiable}";
	}
	
	
	//打开客户
	function openWindows(path) {
		window.location.href = "${pageContext.request.contextPath}/wap/public_customer.do?path="+path;
	} 
	

	</script>
	
<body>
	<!-- 顶部 -->
	<section class="aui-content">
	<div class="aui-list aui-media-list aui-list-noborder aui-bg-info">
		<div class="aui-list-item aui-list-item-middle"
			style="background-color: #14ace8">
			<div class="aui-media-list-item-inner "
				style="background-color: #14ace8">
				<div class="aui-list-item-media" style="width:3rem;">
					<img src="../img/bing.png" class="aui-img-round" id="picture">
				</div>
				<div class="aui-list-item-inner">
					<div class="aui-list-item-text text-white aui-font-size-16"
						id="name"></div>
					<div class="aui-list-item-text text-white">
						<div>
							<i class="aui-iconfont aui-icon-mobile aui-font-size-13"></i><span
								id="phone"></span>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	</section>
	<section class="aui-content">
	<ul class="aui-list aui-list-in aui-margin-b-15">
		<!-- <li class="aui-list-item" onclick="openWindows('phone',null)">
			<div class="aui-list-item-label-icon">
				<i class="aui-iconfont aui-icon-menu aui-text-info"></i>
			</div>
			<div class="aui-list-item-inner aui-list-item-arrow">
				<div class="aui-list-item-title my-font">修改密码</div>
			</div>
		</li>
		
		<!-- <li class="aui-list-item" onclick="openWindows('data',null)">
			<div class="aui-list-item-label-icon">
				<i class="aui-iconfont aui-icon-my aui-text-info"></i>
			</div>
			<div class="aui-list-item-inner aui-list-item-arrow">
				<div class="aui-list-item-title my-font">个人资料</div>
			</div> 
		</li> --> 
		
		<li class="aui-list-item" onclick="openCard();">
			<div class="aui-list-item-label-icon">
				<i class="aui-iconfont aui-icon-cert aui-text-info"></i>
			</div>
			<div class="aui-list-item-inner aui-list-item-arrow">
				<div class="aui-list-item-title my-font">我的顾问</div>
			</div>
		</li>
		<li class="aui-list-item" onclick="openWindows('market_list')">
			<div class="aui-list-item-label-icon">
				<i class="aui-iconfont aui-icon-date aui-text-info"></i>
			</div>
			<span id="notice"
			style="display: none ;width: 10px;height: 10px;background-color: red;position: absolute;top: 10px;left: 130px;border-radius: 5px;"></span>
			<div class="aui-list-item-inner aui-list-item-arrow">
				<div class="aui-list-item-title my-font">参与的活动</div>
			</div>
		</li>
		<!-- 合同到期提醒 -->
		<li class="aui-list-item"  onclick="openWindows('list')">
			<div class="aui-list-item-label-icon">
				<i class="aui-iconfont aui-icon-date aui-text-info"></i>
			</div>
			<span id="noticeOfContractExpiring"
			style="display: none ;width: 10px;height: 10px;background-color: red;position: absolute;top: 10px;left: 130px;border-radius: 5px;"></span>
			<div class="aui-list-item-inner aui-list-item-arrow">
				<div class="aui-list-item-title my-font">我的合同</div>
			</div>
		</li>
	</ul>


	</section>


	<div class="aui-toast" style="display:none;" id="loading">
		<div class="spinner aui-toast-content">
			<div class="spinner-container container1">
				<div class="circle1"></div>
				<div class="circle2"></div>
				<div class="circle3"></div>
				<div class="circle4"></div>
			</div>
			<div class="spinner-container container2">
				<div class="circle1"></div>
				<div class="circle2"></div>
				<div class="circle3"></div>
				<div class="circle4"></div>
			</div>
			<div class="spinner-container container3">
				<div class="circle1"></div>
				<div class="circle2"></div>
				<div class="circle3"></div>
				<div class="circle4"></div>
			</div>
		</div>
</body>
 
</html>